<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/themes/icon.css" />
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.1.2.2.js"></script>
	
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<script type="text/javascript">
		function addTabT(subtitle,url,icon){
			console.log(jq);
            var jq = top.jQuery;    
            
            if (jq("#tabs").tabs('exists', subtitle)){    
                jq("#tabs").tabs('select', subtitle);    
            } else {  
                  var content = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';     
                   jq("#tabs").tabs('add',{    
                                      title:subtitle,    
                                      content:content,    
                                      closable:true    
                  });    
             }    
		}
		</script>
</head>
<body>
	<h5><a href="javascript:;" onclick="addTabT('百度界面','www.baidu.com','aa')">创建标签</a></h5>
	<div id='aa' class="easyui-tabs" fit="true" border="false" style="width: 100%;height:100%;" ></div>
</body>
</html>